import { Link, Construction } from '@brillout/docpress'
import OpenSourcePricingIllustration from '../../pages/index/sections/reliable/open-source-pricing.svg'
import StateOfTheArt from './StateOfTheArt.mdx'
import { QuoteTeam } from '../../components'
import { RecommendedAmountTable } from './RecommendedAmountTable'

<Construction>
The Open Source Pricing isn't implemented yet.

Questions welcome at [#1932](https://github.com/vikejs/vike/discussions/1932).
</Construction>

<div style={{ display: 'flex', justifyContent: 'center', marginTop: 37, marginBottom: 30}}>
  <img src={OpenSourcePricingIllustration} style={{ maxWidth: '100%' }} />
</div>

<QuoteTeam style={{marginTop: 60, marginBottom: 45}}>Paying for Open Source isn't a bug, it's a feature — it's the guarantee Vike's interests are aligned with yours.</QuoteTeam>

Vike will soon introduce what we call an *Open Source Pricing*: a new kind of business model that keeps Vike open source, as well as accessible (so that everyone, regardless of financial resources, can use Vike).

- The entire code **stays 100% open source** (MIT License).
- Everything **stays 100% gratis for engineers**. You don't need any license key and you can use Vike without any restrictions, just like any other open source tool.
- **For companies:**
  - **Pay what you can**. Companies choose the amount they want to pay while we trust them to make a fair choice. (If too many pay too little, we may switch to a fixed pricing.)
  - **Free for small apps**. For new and small Vike apps, Vike is 100% gratis and you don't need any license key: everything works just like any other open source tool.
  - **Apply for a free license key**. For larger apps, you can apply for a free license key if your team cannot afford one or didn't incorporate a company yet. Write two or three sentences explaining your situation and we will give you a free license key.

The Open Source Pricing is a major milestone for Vike's growth. It preserves what makes open source special while aligning Vike's priorities with user interests, fostering a transparent and sustainable relationship.


#### Pricing

<Link doNotInferSectionTitle href="#who-pays-and-how-much" /><br/>
<Link doNotInferSectionTitle href="#do-sponsors-have-to-pay" /><br/>
<Link doNotInferSectionTitle href="#how-does-it-apply-to-monorepos" /><br/>

#### Open Source Pricing

<Link doNotInferSectionTitle href="#how-does-it-work" /><br/>
<Link doNotInferSectionTitle href="#why-zero-investors" /><br/>
<Link doNotInferSectionTitle href="#is-vike-still-free-software" /><br/>
<Link doNotInferSectionTitle href="#why-not-another-business-model" /><br/>


## Who pays and how much?

<RecommendedAmountTable />

<br/>

<Link href="#free-tier" /><br/>
<Link href="#recommendation" /><br/>

<div style={{ marginTop: -15 }} />

### Free tier

Vike's free tier cut-off is determined by what we call the *double-three-threshold*:

- **`>=3` regular committers for the past `>=3` months**

Consequently, Vike is free for:

- Small projects. (Maintained by `<=2` regular committers.)
- Large projects in their infancy. (With a 3-month free trial from the moment the project starts having `>=3` regular committers.)
- Finished projects. (They can be maintained for free by up to two full-time developers.)

If you are within the free tier then **you don't need any license key**: you can use Vike just like any other open source tool. See also <Link href="#how-does-it-work" />

> Occasional contributors (bots, designers, technical managers, etc.) are ignored: they aren't counted as "regular committers".


### Recommendation

The table above is only a recommendation and you can choose any other amount instead &mdash; we trust companies to make a fair choice.

> **Don't hesitate to apply for a free license key** if you have `>=3` regular committers but haven't incorporated yet, just want to experiment, or have a use case you believe should be free.
>
>Keeping Vike accessible to everyone is a primary objective of the Open Source Pricing.

Size estimations:

- **Small organization**: 0-20 employees.
- **Midsize organization**: 20-70 employees.
- **Large organization**: >70 employees. (Also counting the employees of parent companies.)

<div style={{ marginTop: -15, height: 1 }}/>

- **Hobby use case**: Vike is used for experimenting.
- **Small use case**: Vike is used for developing a **project that plays only a marginal role** for your company. For example a landing page or a simple internal app.
- **Midsize use case**: Vike is used for developing a **project that plays only a minor role**. For example a one-shot Vike usage for a significant internal app.
- **Large use case**: Vike is used for developing a **project that plays a significant role**. For example an app with many users or building your own internal framework.




## Do sponsors have to pay?

No, Vike stays 100% gratis for companies sponsoring Vike. Reach out and we will give you a free license key.


## How does it apply to monorepos?

It only applies to apps.

For example, in the following, it applies only to `my-app/` and `my-other-app/`.

```yaml
/packages/my-own-framework/
/packages/my-app/
/packages/my-other-app/
/packages/some-vike-component-wrapper/
```

> See also: <Link href="/build-your-own-framework" />.


## How does it work?

#### The idea

For small (or new) projects, you can use Vike just like any other open-source tool: 100% gratis and without any license key.

For larger projects, Vike shows a pesky toaster `Get your license key at ...` in development (it's never shown in production). You can remove it by purchasing a license key and adding it to `+config.js` or by setting the `VIKE_KEY` environment variable.

#### 100% Open Source

The npm package `vike` will adopt a proprietary license requiring companies to get a license key when they see the pesky toaster (see above). Vike's Git repository stays 100% MIT-licensed.

In theory, since Vike is 100% open source, you could fork it, remove the pesky toaster, and publish your own npm package. But maintaining a fork requires non-negligible effort &mdash; you might as well just apply for a free license key instead.

#### 100% offline

The implementation is 100% offline:
 - Uses asymmetric encryption to validate license keys
 - Reads your Vike configuration (e.g. number of `+Page.js` files) and Git history (e.g. number of Git committers) to distinguish small apps from larger apps

No telemetry, zero server requests.

Your privacy is fully respected. The only information Vike has about your company is when you purchase a license — just like a SaaS.


## Why zero-investors?

If a project accepts investor funding, it will eventually have to take radical decisions to generate massive amounts of revenue — typically aiming for $100 million annually which is the kind of return investors hope for when they invest.

This is often achieved with aggressive techniques such as vendor lock-in and steep fees. At the end of day, it will inevitably result in users having to pay a hefty bill in one form or another.

In contrast, the Open Source Pricing introduces a business relationship with users that is transparent, sustainable and stable.


## Is Vike still Free Software?

Vike is still free as in "free speech" (not as in free beer), see explanations [by the Free Software Foundation](https://www.gnu.org/philosophy/free-sw.en.html) and [by Wikipedia](https://en.wikipedia.org/wiki/Free_software).

We believe in Libre Software and we invented the Open Source Pricing because <Link doNotInferSectionTitle href="#why-not-another-business-model" >other business models contradict Libre Software values</Link>.

Code remains not only 100% open source but also 100% accessible: we believe money (and the lack thereof) should never prevent anyone from using code.



## Why not another business model?

We believe other business models are flawed in fundamental ways.

The Open Source Pricing means:
- As an engineer, a much better software while everything stays 100% gratis.
- As a company, a transparent and sustainable relationship with a tool that is foundational to your stack.

Compared to other business models:

<StateOfTheArt />
